import request from '/@/utils/request';

/**
 * 用户
 * @param params 要传的参数值
 * @returns 返回接口数据
 * 登录api接口集合
 * @method signIn 获取用户列表
 */
export function useCustomerApi() {
	return {
		getCustomerList: (params) => {
			return request({
				url: '/member/member/admin/memberList',
				method: 'post',
				data: params,
			});
		},
		getCustomerDetail: (id) => {
			return request({
				url: `/member/admin/memberDetail/${id}`,
				method: 'get',
			});
		},
		updateCustomer: (params) => {
			return request({
				url: '/member/admin/updateMember',
				method: 'post',
				data: params,
			});
		},
		getCustomerAddressList: (id) => {
			return request({
				url: `/member/admin/receiveAddressList/${id}`,
				method: 'get',
			});
		},
		UpdateCustomerAddress: (params) => {
			return request({
				url: '/member/admin/updateAddress',
				method: 'post',
				data: params,
			});
		},
	};
}
